﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TestDLL.dao;
using TestDLL.domain;

namespace TestDLL.business.service
{
    public class TestService : BaseService
    {
        private TestDao testDao;

        public TestService()
            : base()
        {
            testDao = new TestDao();
        }                     

        public int addTest(string name, string value) {
            Test test = new Test();
            test.setName(name);
            test.setValue(value);
            return this.addTest(test);
        }

        public int addTest(Test test)
        {
            return this.testDao.addTest(test);
        }

        public Test[] getAllTestItems()
        {
            return this.testDao.getAllTestItems();
        }

        public void deleteTestItem(int id)
        {
            this.testDao.deleteTestItem(id);
        }

        public void updateTest(Test test)
        {
            this.testDao.updateTest(test);
        }
    }
}
